]> dgit.raspbian.org Git - gnome-shell.git/commitdiff
messageTray: Remove deprecated code
authorFlorian Müllner <fmuellner@gnome.org>
Tue, 9 Mar 2021 19:48:47 +0000 (20:48 +0100)
committerMarge Bot <marge-bot@gnome.org>
Wed, 10 Mar 2021 15:17:52 +0000 (15:17 +0000)
Originally the Source method for showing notifications was "notify",
which had to change when turning it into a GObject subclass to not
clash with g_object_notify().

That change happened during the 3.36 cycle, so extensions have had
two releases (a year) to adapt to the replacement. That seems long
enough, so remove the deprecated compat code.

https://gitlab.gnome.org/GNOME/gnome-shell/-/issues/3848

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1749>

js/ui/messageTray.js

index ae7f2ca2a85f704c970d472b0d33925fd1be989c..1dab00a7000d1ba1356f03dbab6a5ff31b0f444e 100644 (file)
@@ -703,7 +703,7 @@ var Source = GObject.registerClass({
     }
 
     countUpdated() {
-        super.notify('count');
+        this.notify('count');
     }
 
     _createPolicy() {
@@ -775,21 +775,6 @@ var Source = GObject.registerClass({
             this.emit('notification-show', notification);
     }
 
-    notify(propName) {
-        if (propName instanceof Notification) {
-            try {
-                throw new Error('Source.notify() has been moved to Source.showNotification()' +
-                                'this code will break in the future');
-            } catch (e) {
-                logError(e);
-                this.showNotification(propName);
-                return;
-            }
-        }
-
-        super.notify(propName);
-    }
-
     destroy(reason) {
         let notifications = this.notifications;
         this.notifications = [];